﻿using System;

class Program
{
    static void Main()
    {
        int[] arr =
        {
            1,2,3,4
        };
        int first = int.MinValue;
        first = Check(arr, first);
        Print(first);
      
    }

    private static void Print(int first)
    {
        if (first == int.MinValue)
        {
            Console.WriteLine("-1");
        }
        else
        {
            Console.WriteLine(first);
        }
    }

    private static int Check(int[] arr, int first)
    {
        for (int i = 1; i < arr.GetLength(0) - 1; i++)
        {
            if (arr[i] > arr[i - 1] && arr[i] > arr[i + 1])
            {
                first = i;
                break;
            }
        }
        return first;
    }
}